<div class="m-tab s-tab">
	<h2 class="u-tt">表单管理</h2>
	<ul>
		<li><a href="{$url|'AdminForm/index'}">表单列表</a></li>
		<li class="z-crt"><a href="javascript:;">{$actionName}表单</a></li>
	</ul>
</div>
<div class="m-form">
	<form name="" action="<?php echo url('AdminForm/'.$action.'Data'); ?>" method="post" id="form">
	<form>
		<div class="formitm">
			<label class="lab">名称：</label>
			<div class="ipt">
				<input name="name" type="text" class="u-ipt u-ipt-5" id="name" value="{$info.name}" maxlength="100" datatype="*" />
				<p>表单描述</p>
			</div>
		</div>
		<div class="formitm">
			<label class="lab">表单表名：</label>
			<div class="ipt">
				<input name="table" type="text" class="u-ipt u-ipt-5" id="table" value="{$info.table}" maxlength="20" datatype="/^\w+$/" errormsg="字段表名只能为英文数字和下划线！"  />
				<p>字段表名称只能由英文数字下划线组成</p>
			</div>
		</div>
		<div class="formitm">
			<label class="lab" >内容排序：</label>
			<div class="ipt">
				<input name="sequence" type="text" class="u-ipt u-ipt-5" id="sequence" value="{$info.sequence|is_empty:'data_id desc'}" datatype="*"  errormsg="内容排序不能为空！" />
				<p>针对前后台列表的分页排序</p>
			</div>
		</div>
		<div class="formitm">
			<label class="lab" >前台访问：</label>
			<div class="ipt">
				<div class="txt">
					<?php if(!isset($info['display'])){ $info['display']=1; } ?>
					<label class="u-opt">
						<input name="display" type="radio" value="1" {if="$info['display']==1"} checked="checked" {/if} />
						是 </label>
					<label class="u-opt">
						<input name="display" type="radio" value="0" {if="$info['display']==0"} checked="checked" {/if} />
						否 </label>
				</div>
				<p>关闭后前台将不能查看列表分页内容</p>
			</div>
		</div>
		<div class="formitm">
			<label class="lab" >前台发布：</label>
			<div class="ipt">
				<div class="txt">
					<?php if(!isset($info['release'])){ $info['release']=1; } ?>
					<label class="u-opt">
						<input name="release" type="radio" value="1" {if="$info['release']==1"} checked="checked" {/if} />
						是 </label>
					<label class="u-opt">
						<input name="release" type="radio" value="0" {if="$info['release']==0"} checked="checked" {/if} />
						否</label>
				</div>
				<p>关闭后将不能从前台提交表单</p>
			</div>
		</div>
		<div class="formitm">
			<label class="lab" >前台分页数：</label>
			<div class="ipt">
				<input name="page" type="text" class="u-ipt u-ipt-5" id="page" value="{$info.page|is_empty:'10'}" datatype="n" errormsg="分页数只能为数字" />
				<p>前台列表的分页数</p>
			</div>
		</div>
		<div class="formitm">
			<label class="lab" >提交成功后消息：</label>
			<div class="ipt">
				<input name="return_msg" type="text" class="u-ipt u-ipt-5" id="return_msg" value="{$info.return_msg|is_empty:'表单提交成功！'}" datatype="*" errormsg="提交成功消息不能为空" />
				<p></p>
			</div>
		</div>
		<div class="formitm">
			<label class="lab" >成功后返回地址：</label>
			<div class="ipt">
				<input name="return_url" type="text" class="u-ipt u-ipt-5" id="return_url" value="{$info.return_url}"  />
				<p>不填将返回表单列表页</p>
			</div>
		</div>
		<div class="formitm">
			<label class="lab" >前台列表条件：</label>
			<div class="ipt">
				<input name="where" type="text" class="u-ipt u-ipt-5" id="where" value="{$info.where}" />
				<p>标准SQL条件</p>
			</div>
		</div>
		<div class="formitm">
			<label class="lab" >前台模板：</label>
			<div class="ipt">
				<input name="tpl" type="text" class="u-ipt u-ipt-5" id="tpl" value="{$info.tpl}" />
				<p>前台表单列表所使用的模板</p>
			</div>
		</div>
		<div class="formitm formitm-1  formitm-2">
			<input name="form_id" type="hidden" value="{$info.form_id}" />
			<button class="u-btn" type="submit">保存</button>
			<button class="u-btn s-btn-c3" type="reset">重置</button>
			<span class="status" id="status"></span> </div>
	</form>
	</form>
</div>
<script>
Do.ready('base','form','dialog',function() {
	$('#form').duxForm({returnUrl:'{$url|"AdminForm/index"}'});
});
</script>